package com.itheima.demo;

public class Demo_Lambda {
    public static void main(String[] args) {
        goSwimming(() ->
                System.out.println("一起去爬山!")
        );
        goSwimming(() ->
                System.out.println("给你一次机会!")
        );
        goSwimming(() ->
                System.out.println("给你摆个姿势!")
        );
        goSwimming(() ->
                System.out.println("把你推下山!")
        );
        goSwimming(() ->
                System.out.println("gameover")
        );
        goSwimming(() ->
                System.out.println("啦啦啦啦啦啦啦!")
        );
        goSwimming(() ->
                System.out.println(".........................")
        );

    }

    public static void goSwimming(Swimming swimming) {
        swimming.swim();

    }
}

interface Swimming {
    void swim();
}
